<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>公告列表</title>
    <link rel="stylesheet" th:href="@{../static/css/component.css}">
    <link rel="stylesheet" th:href="@{../static/css/admin.css}">
    <link rel="stylesheet" th:href="@{../static/css/font-awesome.min.css}">
    <script th:src="@{../static/js/JQuery2.1.4.js}"></script>
    <script th:src="@{../static/js/common.js}"></script>
   <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
   <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
   <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="rbody" id="app">
  <div class="top">
    当前位置：后台<i class="fa fa-fw fa-angle-right"></i>公告列表
  </div>
  <div class="main">
    <div class="tabList">
      <span class="active">公告列表</span>
    </div>
    <div class="panel panel-default">
      <div class="panel-heading">
        公告查询
      </div>
      <div class="panel-body">

    <form id="peopleForm"  th:action="@{../notice/querynotice}" method="post">
       输入关键词
      <input type="text"  name="keyword" th:value="${keyword}">
      <button type="submit" class="btn btn-default" >查询</button>
    </form>
      </div>
    </div>
    <div class="tableLists mrb10">
      <form th:action="@{../notice/deletenotice}" method="post">
        <table>
          <tr>
            <th>公告ID</th>
            <th>标题</th>
            <th>添加时间</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
          <tr th:each="notice:${page.records}">
            <td><input  name="noticeId" th:value="${notice.noticeId}" readonly="readonly" style="border: none ; outline: none"/></td>
            <td th:text="${notice.title}"></td>
            <td th:text="${notice.time}"></td>
            <td th:text="${notice.state}"></td>
            <td>
              <button type="submit" class="btn btn-default">删除</button>
            </td>
          </tr>
        </table>
      </form>
      <ul class="pagination">
        <li><a th:href="@{../notice/querynotice(pageNum=1,keyword=${keyword})}">首页</a></li>
        <li><a th:if="${page.current}!=1"
               th:href="@{../notice/../notice/querynotice(pageNum=${page.current}-1,keyword=${keyword})}">上一页</a></li>
        <li><a th:if="${page.current}!=${page.pages}"
               th:href="@{../notice/querynotice(pageNum=${page.current}+1,keyword=${keyword})}">下一页</a></li>
        <li><a th:href="@{../notice/querynotice(pageNum=${page.pages},keyword=${keyword})}">尾页</a></li>
      </ul>
    </div>
  </div>
</div>
</body>
</html>